<template>
  <ul>
<!--任何标签的属性里面出现变量,都需要用到属性绑定-->
    <li v-for="name in arr">
      <router-link :to="'/detail?name='+name">{{name}}</router-link>
    </li>
  </ul>
</template>

<script>
export default {
  name: "ListView",
  data() {
    return {
      arr: ["张三","李四","王五"]
    }
  },
}
</script>

<style scoped>

</style>